#ifndef __CROSSFIRE_SKYBOX
#define __CROSSFIRE_SKYBOX

struct SCF_SkyVertex
{
  D3DXVECTOR3 Point;
  D3DXVECTOR2 UV;

  SCF_SkyVertex( float x, float y, float z, float u, float v )
  {
    Point.x = x;
    Point.y = y;
    Point.z = z;

    UV.x = u;
    UV.y = v;
  }
};

#define SKY_VERTEX_COUNT 24
#define SKY_INDEX_COUNT 36
#define SKY_VERTEX_FVF (D3DFVF_XYZ | D3DFVF_TEX1)

class CF_CORE_API CCF_SkyBox
{
private:
  LPDIRECT3DDEVICE9 m_device;
  LPDIRECT3DTEXTURE9 m_textures[6];
  LPDIRECT3DINDEXBUFFER9 m_indexBuffer;
  LPDIRECT3DVERTEXBUFFER9 m_vertexBuffer;

public:
  CCF_SkyBox(void);
  ~CCF_SkyBox(void);

  BOOL Initialize( LPDIRECT3DDEVICE9 device, const LPWSTR filenames[], float size );
  void Render( CCF_Camera* camera );
};

#endif